| Module | WebmasterTools::Sitemappable::SingletonMethods |
| In: |
lib/webmaster_tools/sitemappable.rb
|
Override this method to determine the last modifed date of all of the models This will be displayed on the sitemap index page
# File lib/webmaster_tools/sitemappable.rb, line 59
59: def sitemap_lastmod
60: find(:first, :order => "#{sitemap_lastmod_field.to_s} desc").send(sitemap_lastmod_field)
61: end
Turns this record into a WebmasterTools::Sitemaps::IndexNode
# File lib/webmaster_tools/sitemappable.rb, line 80
80: def to_sitemap_index_node
81: WebmasterTools::Sitemaps::IndexNode.new(:protocol => sitemap_protocol,
82: :host => sitemap_host,
83: :path => sitemap_index_path,
84: :lastmod => sitemap_lastmod)
85: end
Turns this record into a WebmasterTools::Sitemaps::Node
# File lib/webmaster_tools/sitemappable.rb, line 70
70: def to_sitemap_node
71: WebmasterTools::Sitemaps::Node.new(:protocol => sitemap_protocol,
72: :host => sitemap_host,
73: :path => sitemap_path,
74: :lastmod => sitemap_lastmod,
75: :priority => sitemap_priority,
76: :changefreq => sitemap_changefreq)
77: end